package com.naizhuai.ui.mianbusiness.setting.presenter;

import com.naizhuai.AppContext;
import com.naizhuai.Model.db.user.PersonUserBean;
import com.naizhuai.network.Config;
import com.naizhuai.network.RetrofitServerFactory;
import com.naizhuai.network.apistore.TargetDataRequest;
import com.naizhuai.network.apistore.UserPersonalRequest;
import com.naizhuai.ui.entity.mainbusiness.TargetDetailsBean;
import com.naizhuai.ui.entity.mainbusiness.TargetDetailsReplayBean;
import com.naizhuai.ui.entity.mainbusiness.TargetMainBean;
import com.naizhuai.ui.entity.mainbusiness.TargetSearchLimitedBack;
import com.naizhuai.ui.entity.setting.UserAbilityLabels;
import com.naizhuai.ui.entity.setting.UserRadarLabels;
import com.naizhuai.util.RxUtils;

import java.util.List;
import java.util.Map;

import rx.Observable;

/**
 * 处理公共搜索的类
 * Created by code_han on 2018/1/25.
 */

public class UserPersonalApiStoreIml implements UserPersonalApiStore {

    private static UserPersonalApiStore INSTANCE = null;

    public static UserPersonalApiStore getInstance() {
        if (INSTANCE == null) {
            INSTANCE = new UserPersonalApiStoreIml();
        }
        return INSTANCE;
    }


    private UserPersonalRequest createBaseClass() {
        return RetrofitServerFactory.create(AppContext.getInstance(), UserPersonalRequest.class, Config.TEST_ACTION_BASE_URL);
    }

    @Override
    public Observable<UserRadarLabels> getRadarMsgById(String personId) {
        return createBaseClass().getRadarMsgById(personId).compose(RxUtils.applySchedulers());
    }

    @Override
    public Observable<UserAbilityLabels> getGrowById(String personId) {
        return createBaseClass().getGrowById(personId).compose(RxUtils.applySchedulers());
    }
}
